how to make a rest api call in c